import request from '@/utils/request.js'
// 获取员工列表
export function sysuser(params) {
  return request({
    url: '/sys/user',
    params
  })
}
// 新增员工
export function sysuserPOST(data) {
  return request({
    url: '/sys/user',
    method: 'post',
    data
  })
}
// 删除员工
export function sysuserdelete(id) {
  return request({
    url: `/sys/user/${id}`,
    method: 'delete'
  })
}
// 批量导入
export function sysUserDatch(data) {
  return request({
    url: '/sys/user/batch',
    method: 'POST',
    data
  })
}
// 保存用户信息
export function sysUserPut(data) {
  return request({
    url: `/sys/user/${data.id}`,
    method: 'put',
    data
  })
}
// 获取员工个人信息
export function employeesidPersonalInfo(id) {
  return request({
    url: `/employees/${id}/personalInfo`
  })
}
// 保存员工个人信息
export function employeespersonalInfoPUT(data) {
  return request({
    url: `/employees/${data.userId}/personalInfo`,
    method: 'PUT',
    data
  })
}
// 获取员工岗位信息
export function employeesidJobs(id) {
  return request({
    url: `/employees/${id}/jobs`
  })
}
// 保存员工岗位信息
export function employeesidJobsPUT(data) {
  return request({
    url: `/employees/${data.userId}/jobs`,
    method: 'put',
    data
  })
}
